import { BaseEntity, Column, Entity, PrimaryGeneratedColumn } from "typeorm";
import { OrderEntity } from "./order.entity";
import { RoomEntity } from "./room.entity";

@Entity({ name: 'room_type' })
export class RoomTypeEntity extends BaseEntity {
    @PrimaryGeneratedColumn()
    id: number;

    @Column({
        type: 'varchar',
        length: 300
    })
    roomTypeName: string;//房型名称

    @Column({
        type: 'int'
    })
    roomPrice: number;//房价

    @Column({
        type: 'int'
    })
    num: number;//入住人数


    @Column({
        type: 'tinyint',
        default: 1
    })
    status: 0 | 1;//0：禁用，1: 启用

    order: OrderEntity[];

}